/********************************************************************
filename : wolf_adc.h
discript : dreamwolf ADC driver,the pinmap as bellow:
					 Analog out   -> ADC123_IN12(PC2).
version  : V0.0
editor   : Icy - dreamwolf
time     : 2014.4.8
statement: This file is modified by dreamwolf under LGPL,you could use 
           it free.We cann't ensure there is no error in this file,and
				   if you detect an error please contact us freely,it is so a-
					 ppreciate for your help to improve our code that could help 
					 more people to use it safty.
contact  : edreamtek@163.com
           www.edreamtek.com
********************************************************************/

#ifndef __WOLF_ADC_H__
#define __WOLF_ADC_H__

#include "stm32f0xx.h"
#include "wolf_typedefine.h"
#include "wolf32f031_board_pinmap.h"
#include "wolf_delay.h"

typedef struct
{
	uint16_t ADCConvertedValueLocal;		//Save the value read from registor.
	uint16_t Precent;										//Save the precent to full range.
 	uint16_t Voltage;										//Save the voltage calculate with reference voltage.
}ADC_RESULT;


#define ADC1_DR_Address         	0x40012440	//ADC1 DR registor base address.


ADC_RESULT wolf_read_ADC_result(void);


/* Private function prototypes -----------------------------------------------*/
void ADC1_CH_DMA_Config(void);


#endif

